$().ready(function(){
    $('.super_container').height($(window).height())
})
function postForm(){
    var formlog = new FormData($('#form_login')[0]);
    $.ajax({
        url: "login.py",
        type: "POST",
        data: form,
        datatype: 'json',
        contentType: false,
        processData: false,
        success: function (data) {
            alert('登录成功')
        },
        error: function (data) {
            console.log(data.msg)
        }
    })
}
function checkPassword() {
    if ($.trim($('#user_name').val()).length == 0) {
        $('#erromsg').html('请输入用户名');
        $('#user_name').focus();
        return false;
    } else {
        if ($.trim($('#user_password').val()).length==0){
            $('#erromsg').html('请输入密码');
            $('#user_password').focus();
            return false
        }
        else postForm();
    }
}
